package org.jeeasy.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author AlpsDDJ
 * @date 2020/11/23 10:57
 */
@Getter
@AllArgsConstructor
public enum EnableFlagEnum implements IDictEnum<Integer> {
    // 启用
    YES(1, "启用", SUCCESS_COLOR),
    // 未启用
    NO(0, "停用", DEFAULT_COLOR),
    ;

    private final Integer value;
    private final String text;
    private final String color;


    public static Integer yes() {
        return YES.getValue();
    }

    public static Integer no() {
        return NO.getValue();
    }

    public static boolean yes(Integer val) {
        return YES.getValue().equals(val);
    }

}
